import React from 'react'
import { observer } from 'mobx-react-lite' // mobx-react-lite 专注于 hooks 的库
import counterStore from '@/mbox/store.lite'
import { Button, Typography, Flex, Space } from 'antd'

const Pagemobx = () => {
	return (
		<Flex>
			<Space>
				<Typography.Title>{counterStore.count}</Typography.Title>
				<Button onClick={() => counterStore.increment()}>Increment</Button>
				<Button onClick={() => counterStore.decrement()}>Decrement</Button>
			</Space>
		</Flex>
	)
}

export default React.memo(observer(Pagemobx))
